FUNCTION( CONCAT_FILES OUTPUT FILELIST )
    FILE(WRITE ${OUTPUT} "")
    FOREACH(SCRIPTFILE ${FILELIST})
        FILE(READ ${SCRIPTFILE} CONTENTS)
        FILE(APPEND ${OUTPUT} "${CONTENTS}")
    ENDFOREACH()
ENDFUNCTION(CONCAT_FILES)
STRING(REPLACE "," ";" FILELIST ${FILELIST})
CONCAT_FILES("${OUTPUT}" "${FILELIST}")
